﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MaxLeaf.Platform.DataContract;
using CommonsLib.DB;
using MaxLeaf.Platform.DALImplementation;
using MaxLeaf.Platform.Functions;
using CommonsLib.Utility;
using MaxLeaf.Platform.Commons;

namespace MaxLeaf.Platform.BLLImplementation
{
    public class imOthersOutputDtlBLL:BaseBLL
    { 

        public override string FinterIDFields
        {
            get
            {
                return string.Format("{0},{1}", "DtlID", (int)FinterIDType.OthersOutputDtl);
            }
        }


        internal void SetStoresOutputDtlId(DBAccess dbcon, int intKey, int intStoresOutputHdrID, int intStoresOutputDtlID)
        {
            ((imOthersOutputDtlDAL)this.CurrentDAL).SetStoresOutputDtlId(dbcon, intKey, intStoresOutputHdrID, intStoresOutputDtlID);
        }

        internal void SetPosted(DBAccess dbcon, int intKey)
        {
            ((imOthersOutputDtlDAL)this.CurrentDAL).SetPosted(dbcon, intKey);
        }

        internal List<int> GetUnpostKeys(int intOthersOutputHdrID)
        {
            using (DBAccess dbcon = DataFunc.GetDBAccessByDataModelType(typeof(imOthersOutputDtlDataModel)))
            {
                return ((imOthersOutputDtlDAL)this.CurrentDAL).GetUnpostKeys(dbcon, intOthersOutputHdrID);
            }
        }

        internal void GetRecvData(DBAccess dbConOrder, int intKey, out int intStoresOutputHdrId, out int intStoresOutputDtlId, out double dblRecvQty)
        {
            ((imOthersOutputDtlDAL)this.CurrentDAL).GetRecvData(dbConOrder, intKey, out   intStoresOutputHdrId, out   intStoresOutputDtlId, out   dblRecvQty);
        }

        internal void SetUnRecv(DBAccess dbcon, int intKey)
        {
            ((imOthersOutputDtlDAL)this.CurrentDAL).SetUnRecv(dbcon, intKey);
        }
    }
}
